package com.gcxy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gcxy.core.PageVO;
import com.gcxy.core.R;
import com.gcxy.dto.*;
import com.gcxy.dto.student.AddStudentInfoDTO;
import com.gcxy.dto.student.DeleteStudentDTO;
import com.gcxy.dto.student.StudentPageDTO;
import com.gcxy.dto.student.UpdateStudentDTO;
import com.gcxy.entity.User;
import com.gcxy.vo.student.StudentPageVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * Copyright (C), 2024-2024, BUG闭退！
 * Author: Huang先森
 * Date: 2024/8/2 10:20
 * FileName: StudentService
 * Description:
 */
public interface StudentService extends IService<User> {
    R<?> insertStudent(AddStudentInfoDTO addStudentInfoDTO);

    R<?> updateStudent(UpdateStudentDTO updateStudentDTO);

    R<?> deleteStudent(DeleteStudentDTO deleteStudentDTO);

    R<PageVO<StudentPageVO>> getStudentPageByCondition(StudentPageDTO studentPageDTO);

    R<?> downloadAddUserTemple(HttpServletResponse response);

    R<?> batchImportStudents(BatchImportDTO batchImportDTO, HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 根据组织id获取当前组织下的学生
     * @param agencyId
     * @return
     */
    List<User> getStudentListByAgencyId(Integer agencyId);

    R<List<StudentPageVO>> getStudentListByCondition(StudentPageDTO studentPageDTO);
}
